Ext.define('PJ.view.trainingmanagement.CourseList', {
    extend: 'AM.default.DefaultList',
    alias: ['widget.pfCourseList'],
    selModel: {
        selType: '',
        // 设置为只能通过复选框选中行
        checkOnly: true
    },
    initComponent: function(){
        this.columns = [{
            header: '日期',
            dataIndex: 't.speakDate',
            width: 90,
            renderer: function(value, meta, record){
                meta.tdAttr = 'data-qtip="' + value + '"';
                return value;
            }
        }, {
            header: '时间',
            dataIndex: 'c.dataCode',
            width: 60,
            renderer: function(value, meta, record){
                meta.tdAttr = 'data-qtip="' + value + '"';
                return value;
            }
        }, {
            header: '课程名',
            dataIndex: 't.courseName',
            flex:1,
            minWidth: 70,
            renderer: function(value, meta, record){
                meta.tdAttr = 'data-qtip="' + value + '"';
                return value;
            }
        }, {
            header: '课程类型',
            dataIndex: 's.dataCode',
            width: 80,
            renderer: function(value, meta, record){
                meta.tdAttr = 'data-qtip="' + value + '"';
                return value;
            }
        }, {
            header: '授课教师',
            dataIndex: 't.speaker',
            width: 70,
            renderer: function(value, meta, record){
                meta.tdAttr = 'data-qtip="' + value + '"';
                return value;
            }
        }, {
            text: '教师单位',
            dataIndex: 't.speakdept',
            width: 80,
            renderer: function(value, meta, record){
                meta.tdAttr = 'data-qtip="' + value + '"';
                return value;
            }
        }, {
            header: '职务职称',
            dataIndex: 't.speakDuty',
            width: 60,
            renderer: function(value, meta, record){
                meta.tdAttr = 'data-qtip="' + value + '"';
                return value;
            }
        }];
        this.store = Ext.create('PJ.'+ prototype +'.trainingmanagement.OperatingCourseList', {
            isLoad: false
        });
        this.loadType = gj_onlineLearning_constant.loadType;
        this.callParent(arguments);
    },
    listeners: {
        viewready: function(){
            var me = this;
            // 触发权限过滤事件
            me.fireEvent("permission", this);
            var params = me.store.proxy.extraParams;
            var newParams = {
            		searchClassId: me.up('window').classId
            };
            Ext.apply(params, newParams);
            this.store.isLoad = true;
            this.store.load();
        }
    }
});
